import request from '../utils/request'

export function fetchAllVersionOfTemplate(params){
    return request({
        url:'/api/Protocol/QueryVersionByTemplateName',
        method:'get',
        params:params
    })
}
export function fetchAllTemplate() {
    return request({
        url:'/api/Protocol/QueryAllTemplates',
        method:'get'
    })
}

export function fetchAllNurseSigns(){
    return request({
        url:'/api/Protocol/QueryNurseSigns',
        method:'get'
    })
}

export function fetchAllPatientSigns(){
    return request({
        url:'/api/Protocol/QueryPatientSigns',
        method:'get'
    })
}

export  function addTemplateName(params){
    return request({
        url:'/api/Protocol/AddTemplate',
        method:'post',
        data:params
    })
}

export  function CreateNewTemplateVersion(params){
    return request({
        url:'/api/Protocol/CreateNewTemplateVersion',
        method:'post',
        data:params
    })
}
export  function DeleteTemplate(params){
    return request({
        url:'/api/Protocol/DeleteTemplate',
        method:'delete',
        params:params
    })
}
export  function UpdateTemplateVersion(params){
    return request({
        url:'/api/Protocol/UpdateTemplateVersion',
        method:'put',
        params:params
    })
}
export  function DeleteVersionById(params){
    return request({
        url:'/api/Protocol/DeleteVersionById',
        method:'delete',
        params:params
    })
}
export  function DeleteSign(params){
    return request({
        url:'/api/Protocol/DeleteSign',
        method:'delete',
        params:params
    })
}
export function QueryByStatus(params){
    return request({
        url:'/api/Protocol/QueryByStatus',
        method:'get',
        params:params
    })
}

export function getNurseByCondition(params){
    return request({
        url:'api/Protocol/ConditionQueryNurse',
        method:'get',
        params:params
    })
}
export function getPatientByCondition(params){
    return request({
        url:'/api/Protocol/ConditionQueryPatient',
        method:'get',
        params:params
    })
}
